
// 导入vue-router插件
import VueRouter from "vue-router"

// 导入组件
import HeBei from '../pages/HeBei'
import HeNan from '../pages/HeNan'
import City from '../pages/City'

// 创建路由器对象（在路由器对象中配置路由。）
const router = new VueRouter({
    // 在这里配置所有的路由规则。
    routes: [
        {
            path: '/hebei',
            component: HeBei,
            children: [
                {
                    path: 'city',
                    component: City
                }
            ]
        },
        {
            path: '/henan',
            component: HeNan,
            children: [
                {
                    path: 'city',
                    component: City
                }
            ]
        }
    ]
})

// 暴露路由器对象(导出路由器对象)
export default router